package com.financing.platform.service.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.financing.platform.dao.IFaUserVisitDao;
import com.financing.platform.dto.FaUserVisitDTO;
import com.financing.platform.service.IFaUserVisitService;
import com.financing.platform.vo.FaUserVisitStatisticVO;

@Service("faUserVisitServiceImpl")
@Transactional
public class FaUserVisitServiceImpl extends BaseServiceImpl implements
		IFaUserVisitService {

	@Autowired
	private IFaUserVisitDao faUserVisitDaoImpl;
	
	public int addFaUserVisit(FaUserVisitDTO faUserVisitDTO)
			throws SQLException {
		return faUserVisitDaoImpl.addFaUserVisit(faUserVisitDTO);
	}

	public List<FaUserVisitDTO> queryFaUserVisit(FaUserVisitDTO faUserVisitDTO) {
		return faUserVisitDaoImpl.queryFaUserVisit(faUserVisitDTO);
	}

	@Override
	public FaUserVisitStatisticVO queryFaUserVisitStatistic(String faId)
			throws SQLException {
		return faUserVisitDaoImpl.queryFaUserVisitStatistic(faId);
	}

	@Override
	public String queryFaIdByLoginName(String loginName)throws SQLException {
		return faUserVisitDaoImpl.queryFaIdByLoginName(loginName);
	}

	@Override
	public void updateLastVisitTime(FaUserVisitDTO faUserVisitDTO) throws SQLException {
		faUserVisitDaoImpl.updateLastVisitTime(faUserVisitDTO);
	}
	
}
